-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug fixes #1819
Bug fixes #1819
Conversation
|
||
# If this is a runsettings file then try to get the custom results location from it | ||
|
||
if((([string]::Compare([io.path]::GetExtension($runSettingsFilePath), ".runsettings", $True) -eq 0) -Or ([string]::Compare([io.path]::GetExtension($runSettingsFilePath), ".tmp", $True) -eq 0)) -And |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can u simplify this? Refactor the into method like
IsRunSettingsFile
CheckIfNotFolder etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
rest looks fine to me |
if((([string]::Compare([io.path]::GetExtension($runSettingsFilePath), ".runsettings", $True) -eq 0) -Or ([string]::Compare([io.path]::GetExtension($runSettingsFilePath), ".tmp", $True) -eq 0)) -And | ||
!(Test-Path $runSettingsFilePath -pathtype container)) | ||
{ | ||
$runSettingsForTestResults = [System.Xml.XmlDocument](Get-Content $runSettingsFilePath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens in case of malformed XML?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the node we are looking for is not there, it will default to old behaviour. If the xml structure itself is wrong, it will fail as expected with appropriate error.
Approving with suggestions. Please do resolve them |
Fixing
BUG 592101: Minor help text fix
BUG 594989: Supporting publish from custom results location in runsettings
Validation: Manual , UTs